package com.utopia.keyvalue.utils;

/**
 * @author yanjiaqiang
 * @date 2011-3-15
 * @version $Id: RuntimeExceptionWraper.java 5 2011-03-22 09:23:42Z JiaqiangYan@gmail.com $
 */
public class RuntimeExceptionWraper {

	public static RuntimeException wrap(Exception e) {
		if (e instanceof RuntimeException) {
			return (RuntimeException) e;
		}
		return new RuntimeException(e);
	}

	public static RuntimeException wrap(String msg) {
		return new RuntimeException(msg);
	}
}
